﻿Imports System.Collections.Generic
Imports Pop.Api.Response
Imports Pop.Api.Util

Namespace Pop.Api.Request

    ''' <summary>
    ''' 2.01 (初级)卖家查寻单个订单详情信息接口
    ''' </summary>
    Public Class GetDealDetailRequest
        Inherits PopRequest(Of GetDealDetailResponse)

        ''' <summary>
        ''' 卖家QQ号
        ''' </summary>
        Property SellerUin As Nullable(Of Long)

        ''' <summary>
        ''' 订单编码
        ''' </summary>
        Property DealCode As String

        ''' <summary>
        ''' 是否列出商品
        ''' </summary>
        Property ListItem As Nullable(Of Long)

#Region "Overrides"

        Protected Overrides Function GetApiName() As String
            Return "deal.getDealDetail"
        End Function

        Protected Overrides Function GetParameters() As IEnumerable(Of KeyValuePair(Of String, String))
            Dim parameters As New PopDictionary
            parameters.Add("sellerUin", Me.SellerUin)
            parameters.Add("dealCode", Me.DealCode)
            parameters.Add("listItem", Me.ListItem)
            Return parameters
        End Function

        Protected Overrides Sub Validate()
            Me.SellerUin.ValidateRequired("sellerUin")
        End Sub

#End Region

    End Class

End Namespace
